package com.iotechn.unimall.app.api.inspection;

import com.dobbinsoft.fw.core.annotation.HttpMethod;
import com.dobbinsoft.fw.core.annotation.HttpOpenApi;
import com.dobbinsoft.fw.core.annotation.HttpParam;
import com.dobbinsoft.fw.core.annotation.HttpParamType;
import com.dobbinsoft.fw.core.annotation.param.NotNull;
import com.dobbinsoft.fw.core.exception.ServiceException;
import com.dobbinsoft.fw.support.model.Page;
import com.iotechn.unimall.data.domain.InspectionRoundsDO;

import java.util.Date;
import java.util.List;

/**
 * Generate Code By Unimall
 */
@HttpOpenApi(group = "app.inspectionrounds", description = "unimall_inspection_roundsService")
public interface AppInspectionRoundsService {

    @HttpMethod(description = "删除", permission = "PatrolRecord:inspectionrounds:delete", permissionParentName = "其他", permissionName = "inspectionRounds")
    public boolean delete(
            @NotNull @HttpParam(name = "id", type = HttpParamType.COMMON, description = "id") Long id,
            @NotNull @HttpParam(name = "adminId", type = HttpParamType.ADMIN_ID, description = "管理员ID") Long adminId) throws ServiceException;


    @HttpMethod(description = "app轮数查询")
    public List<InspectionRoundsDO> appRounds() throws ServiceException;

    @HttpMethod(description = "app记录轮数")
    public List<InspectionRoundsDO> appRecordRounds(
            @HttpParam(name = "date", type = HttpParamType.COMMON, description = "时间") String date) throws ServiceException;

    @HttpMethod(description = "开始")
    public InspectionRoundsDO create(
            @NotNull @HttpParam(name = "inspectionPeople", type = HttpParamType.COMMON, description = "巡检人") String inspectionPeople,
            @NotNull @HttpParam(name = "rounds", type = HttpParamType.COMMON, description = "轮数") Integer rounds) throws ServiceException;

    @HttpMethod(description = "结束")
    public String end(
            @NotNull @HttpParam(name = "id", type = HttpParamType.COMMON, description = "主键") Long id) throws ServiceException;

}
